import React, { Component } from 'react';
import {
    AppRegistry,
    StyleSheet,
    Text,
    View,
    Image,
    Navigator
} from 'react-native';
import NavigationBar from '../../common/NavigationBar'
import CustomKeyPage from './CustomKeyPage'
import SortKeyPage from './SortKeyPage'
import LanguageDao, {FLAG_LANGUAGE} from '../../expand/dao/LanguageDao'

export default class MyPage extends Component {
    constructor(props) {
        super(props)
        this.state={
            word: ''
        }
    }


    render() {
        return (
            <View style={styles.container}>
                <NavigationBar
                    title={'我的'}
                    style={{backgroundColor: '#6495ed'}}
                />
                <Text style={styles.text} onPress={() => {
                    this.props.navigator.push({
                        component: CustomKeyPage,
                        params: {...this.props, flag: FLAG_LANGUAGE.flag_key}
                    })
                }}>自定义标签页</Text>
                <Text style={styles.text} onPress={() => {
                    this.props.navigator.push({
                        component: SortKeyPage,
                        params: {...this.props}
                    })
                }}>标签排序</Text>
                <Text style={styles.text} onPress={() => {
                    this.props.navigator.push({
                        component: CustomKeyPage,
                        params: {...this.props, isRemoveKey: true}
                    })
                }}>标签移除</Text>
                <Text style={styles.text} onPress={() => {
                    this.props.navigator.push({
                        component: CustomKeyPage,
                        params: {...this.props, flag: FLAG_LANGUAGE.flag_language}
                    })
                }}>自定义语言页</Text>
            </View>
        )
    }
}

const styles = StyleSheet.create({
    container: {
        flex: 1,
        backgroundColor: 'white',
        justifyContent: 'center'
    },
    text: {
        fontSize: 20
    }
});